#ifndef GEODEFINATION_H
#define GEODEFINATION_H

#include <QPoint>

const static double MAX_RANGE = 20037508.342789;    ///<顶层Tile的坐标的取值范围（-MAX_RANGE， MAX_RANGE）
const static int TILE_SIZE = 256;                   ///<瓦片图像的边长（像素数）
const static int MAX_LEVEL = 18;                    ///<最大缩放层级

struct GeoPoint
{
    double x;
    double y;
    GeoPoint(double _x, double _y) {x = _x; y = _y;}
    GeoPoint() {x = 0; y = 0;}
};


struct GeoExtent
{
    double minx;
    double miny;
    double maxx;
    double maxy;
    GeoExtent() {minx = 0; miny = 0; maxx = 0; maxy = 0;}
};

QPoint COMFUNC_DegreeToXYIndex(double lon, double lat, int z);

#endif // GEODEFINATION_H
